package org.example.y24.m10;

import java.util.Scanner;

public class Test4 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[][] pascal = new int[n][n];
        for (int i = 0; i < n; i++) {
            pascal[i][0] = 1;
            System.out.print(pascal[i][0] + " ");
            for (int j = 1; j <= i; j++) {
                if (j == i){
                    pascal[i][j] = 1;
                    System.out.print(pascal[i][i]);
                }else {
                    pascal[i][j] = pascal[i - 1][j] + pascal[i - 1][j-1];
                    System.out.print(pascal[i][j] + " ");
                }
            }
            System.out.println();
        }
    }
}
